package cn.xtcode.infrastructure.dao;

import cn.xtcode.infrastructure.dao.po.GroupBuyOrder;
import org.apache.ibatis.annotations.Mapper;

/**
* @Author xt-code
* @Description:
* @Create 2025/5/9 17:34 
*/
@Mapper
public interface GroupBuyOrderMapper {
    /**
     * 插入数据
     * @param groupBuyOrder
     */
    void insert(GroupBuyOrder groupBuyOrder);

    /**
     * 更新锁单数量
     * 调用该方法，就给对应teamId的锁单数 +1
     */
    int updateAddLockCount(String teamId);

    /**
     * 减少锁单量
     */
    int updateSubtractLockCount(String teamId);

    /**
     * 查询拼团进度
     */
    GroupBuyOrder queryGroupBuyProgress(String teamId);

    GroupBuyOrder queryGroupBuyTeamByTestId(String teamId);


    int updateAddCompleteCount(String teamId);

    int updateOrderStatus2COMPLETE(String teamId);
}